{\rtf1\ansi\ansicpg1252\cocoartf949\cocoasubrtf540
{\fonttbl\f0\fswiss\fcharset0 Helvetica;}
{\colortbl;\red255\green255\blue255;}
\paperw11900\paperh16840\margl1440\margr1440\vieww17260\viewh15580\viewkind0
\pard\tx566\tx1133\tx1700\tx2267\tx2834\tx3401\tx3968\tx4535\tx5102\tx5669\tx6236\tx6803\ql\qnatural\pardirnatural

\f0\fs24 \cf0 Distribuci\'f3 del codi font:\
-----------------------------\
jlaw\
	entitats--codi font de les entitats i persistance.xml\
	ejbs -- classes ejb\
	appclient--codi del client\
	build.xml\
\
Passos per la compilaci\'f3\
----------------------------\
Canviar el directori glassfish.home de build.xml\
\
ant build: produeix build/jlaw.ear\
ant deploy: guarda l'applicacio aservidor\
ant verify: mira que la app compleixi les normes\
\
Per executar l'applicaci\'f3\
-----------------------------\
\
\
................\
\
\
La bd utilitza un nom jndi "bdpfc" configuraro al glassfish!\
\
<-------------->\
\
Source code lay out:\
--------------------\
blog5\
     entities -- entity source code and persistence.xml\
     ejbs -- ejb classes are here.\
     web-app2 -- servlet source code, html pages and web.xml are here.\
     appclient -- application client code is here.\
     build.xml \
\
Build steps:\
------------\
change glassfish.home property in build.xml.\
glassfish.home property points to the root of the application server\
installation directory. The only external library used by build process\
is javaee.jar which contains all the standard Java EE API classes.\
\
ant build: produces build/blog5.ear\
ant deploy: deploys the app to app server.\
ant verify: verifies compliance of the app against Java EE spec.\
\
To run the application \
----------------------\
open http://localhost:8080/web-app2/login.html\
This uses the servlets.\
\
To run the application client, run:\
$GLASSFISH_HOME/bin/appclient -client $GLASSFISH_HOME/domains/domain1/generated/xml/j2ee-apps/blog5/blog5Client.jar <Names of user that you want to remove>\
\
Note, there is a special option in asadmin deploy called --retrieve which \
can be used to download the blog5Client.jar to a directory of your choice.\
Run asadmin deploy --help for more details.\
\
Database Setup:\
---------------\
No need to set up data sources or create tables. The application uses\
Java2DB feature in glassfish and creates the table automatically during\
deployment (See --createtables option used in build.xml).\
This creates a table called "USERCREDENTIAL" with two columns \
called "NAME" and "PASSWORD" in database called sun-appserv-samples. \
This is the default Derby database that Sun App Server uses if \
no data source details are supplied in persistence.xml.\
\
So all you need to do is to start Derby by running the following command:\
\
$GLASSFISH_HOME/bin/asamdin start-database\
\
\
You are free to use any other database that you like. To do that you have \
to create a datasource (refer to app server document for this) and \
configure persistence.xml.\
\
Some common Sun Java System Application Server commands:\
--------------------------------------------------------\
To start the appserver:\
asadmin start-domain\
\
To stop the appserver:\
asadmin stop-domain\
\
To deploy an app:\
asadmin deploy --user admin  --passwordfile .adminpassword.txt --createtables --retrieve /tmp <path to app>\
change user name and password to whatever you used during installtion.\
\
To undeploy an app:\
asadmin undeploy --user admin  --passwordfile .adminpassword.txt <basename of the app>\
}